function login() {
    var username = document.getElementById("username").value;
    var password = document.getElementById("password").value;
 
    if (username === "admin" && password === "123") {
        alert("登陆成功");
        window.location.href = "dashboard.html";
    } else {
        alert("请输入账号或密码");
    }
}